From aa3ca83fdad5dca6e898a116cb9b585ed4dd4e09 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 11 Apr 2008 09:14:03 +0100 Subject: [PATCH] tools: Make xend set time offset for all kinds of domains, so that ioemu doesn't need to do it. Signed-off-by: Samuel Thibault --- tools/ioemu/target-i386-dm/helper2.c | 2 -- tools/python/xen/xend/image.py | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/ioemu/target-i386-dm/helper2.c b/tools/ioemu/target-i386-dm/helper2.c index 45c8fe0e86..46fe5433a1 100644 --- a/tools/ioemu/target-i386-dm/helper2.c +++ b/tools/ioemu/target-i386-dm/helper2.c @@ -392,8 +392,6 @@ void timeoffset_get(void) else time_offset = 0; - xc_domain_set_time_offset(xc_handle, domid, time_offset); - free(p); } diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index cf76e53c29..95a2f68a5a 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -99,7 +99,9 @@ class ImageHandler: self.vncconsole = vmConfig['platform'].get('vncconsole') self.dmargs = self.parseDeviceModelArgs(vmConfig) self.pid = None - + rtc_timeoffset = vmConfig['platform'].get('rtc_timeoffset') + if rtc_timeoffset is not None: + xc.domain_set_time_offset(self.vm.getDomid(), int(rtc_timeoffset)) def cleanupBootloading(self): @@ -419,9 +421,6 @@ class LinuxImageHandler(ImageHandler): def configure(self, vmConfig): ImageHandler.configure(self, vmConfig) - rtc_timeoffset = vmConfig['platform'].get('rtc_timeoffset') - if rtc_timeoffset is not None: - xc.domain_set_time_offset(self.vm.getDomid(), int(rtc_timeoffset)) def buildDomain(self): store_evtchn = self.vm.getStorePort() -- 2.30.2